# coding: utf-8  
#this is a description注释用井号
#print("Hello Python world")
from builtins import str

# name="ada lovelace" 
# print(name.title())#as title print 当标题打印
#upper and lower 大小写
# print(name.upper())
# print(name.lower())

#字符串连接
# first_name = "ada"
# last_name = "lovelace"
# full_name = first_name +" " + last_name
# 
# print(full_name)

#制表符\t来添加空白
# print("\tPython")
# #用换行符\n换行
# print("\nPython\nC\nJavaScript")

#str（）避免类型错误
# age = 23
# message = "Happy"+age+"rd Birthday!" 这样会跳出类型错误，提示用str()
# message = "Happy "+str(age)+"rd Birthday!"
# print(message)

#列表 用方括号[]
# bicycles = ['trek','cannondale','redline','specialized']
# print(bicycles[0])#通过索引来访问元素
#使用列表值
# message = "my first bicycle was a " + bicycles[0].title()+"."
# print(message)

#/修改列表值
# motocycles = ['honda','yamaha','suzuki','haojue']
#print(motocycles)
#通过索引值修改元素
# motocycles[0] = 'dacati' 
# print(motocycles)

#列表末尾添加元素
# motocycles.append('ducati')
# print(motocycles)

#列表中插入元素
# motocycles.insert(0, 'SF')
# print(motocycles)

#使用del语句删除元素
#motocycles = ['honda','yamaha','suzuki','haojue']
#del motocycles[0]
#print(motocycles)

#弹出列表中任何位置处的删除
motorcycles = ['honda','yamaha','suzuki']
print(motorcycles)
first_owned = motorcycles.pop(0)
print('The first motorcyle I owned was a '
        + first_owned.title()+ '.')#当使用pop()后，被弹出使用的元素被删除了
print(motorcycles)








